<?php

require_once './include/common.inc.php';
require_once 'left.php';
require_once 'right.php';

$page_title = 'Acuity World WebShop';
$menu_id = 0;
$menu_str = PrintMenu();

$product_title = 'Training Schedule';
$timestamp2 = date("Y-m-d");

/*
* status=yes, publish_date <= '$today' And expiring_date>'$today' order by order_index
*
* Evening Seminars  ===> type=1
* Training Courses  ===> type=2
* Training Programs ===> type=3
* In-house Training ===> type=4
*
*/

db2Init();
$sql = "SELECT  s.`id`, s.`name`, c.`type`, c.`details`, s.`course_link`, s.`trainer_link`, s.`country`, s.`country2`, s.`date` FROM `course_schedule` s, `course_basic` c WHERE c.`name` = s.`course` AND s.`status` = 'Yes' AND s.`publish_date` <= '$timestamp2' And s.`expiring_date` > '$timestamp2' ORDER BY s.`order_index` ASC";
$query = $db2->query($sql);
while($rs = $db2->fetch_array($query)) {
    $out_ary[$rs['type']][$rs['id']] = $rs;
}
$db2 = null;


require_once PrintEot('header');
require_once PrintEot('left');
require_once PrintEot('training_schedule');
require_once PrintEot('right');
require_once PrintEot('footer');

?>